<?php
class Tour
{
    /**
     * @var object Zend DB Adapter
     */
    private $_db;
    
    public function __construct()
    {
			$this->_db = Zend_Registry::get('db');
    }
    
    public function getTourDetailsById($tour_id)
    {
    	$this->_db->query("SET NAMES 'utf8'");
    	$sql = $this->_db->fetchRow("
    		SELECT tour_title, no_days, no_nights, tour_includes_en, tour_includes_ru, tour_excludes_en, tour_excludes_ru, tour_description_en, tour_description_ru, status  
    		FROM tours
    		WHERE tour_id = " . $tour_id);
    	
    	return $sql;
    }
    
    public function getTourDetails()
    {
    	$this->_db->query("SET NAMES 'utf8'");
    	$sql = $this->_db->fetchAll("
    		SELECT tour_id, tour_title, no_days, no_nights, tour_description_en, tour_description_ru
    		FROM tours
    		WHERE status = 1");
    	
    	return $sql;
    }
} 
?>